Skip to content

Add grammar for vba 7.1#4906

Merged
teverett merged 6 commits into
antlr:masterfrom
Beakerboy:patch-5
Jun 20, 2026
Merged

Add grammar for vba 7.1#4906
teverett merged 6 commits into
antlr:masterfrom
Beakerboy:patch-5

Conversation

@Beakerboy

@Beakerboy Beakerboy commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

The vba 7.1 grammar has an official specification from Microsoft. This lexer and parser follows that specification as close as possible. The existing vba6 grammar is widely used, but differs so much that changing it to match the specification would introduce breaking changes.

Add README for Visual Basic 7.1 grammar details and usage.
* Update fmt.Println message from 'Hello' to 'Goodbye'

* Rename README.md to README.md

* Rename vbaParser.g4 to vbaParser.g4

* Create vbaLexer.g4

* Create pom.xml

* Create desc.xml

* Add SQLSelect class for SQL query handling

* Rename vba/vba7_1/SQLSelect.cls to vba/vba7_1/examples/SQLSelect.cls

* Create SQLHelperFunctions.bas

* Create Form1.frm

* Add test_class_declarations.cls for class declarations

* Add test_control_structures.bas with control structures

* Create test_function.bas

* Create test_function_names.bas

* Add test_line_continuation.bas for line continuation example

* Create TestLiterals module for testing literals

Add a new module to test various literal formats in VBA.

* Create test_statements.bas

* Create test_sub.bas

* Create test_variables.bas
@teverett

Copy link
Copy Markdown
Member

@Beakerboy thanks!

@teverett teverett merged commit 3cf1cf5 into antlr:master Jun 20, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants